﻿$(function () {
    $(".iframeleftmenu").css("height", $(window).height() - 38 + "px");
    $(".iframebtn").css("height", $(window).height() - 38 + "px");
    $(".iframebtn").children().eq(0).css("padding-top", ($(window).height() - 38 - 73) / 2 + "px");
    $(".iframemainbody").css("height", $(window).height() - 38 + "px");
    $(".topmenu").children().eq(0).children().eq(0).css("background-image", "url('/Framework/images/1_01.gif')");
    $(".topmenu").children().eq(0).children().eq(0).css("background-repeat", "no-repeat");
    $(".topmenu").children().eq(0).children().eq(1).css("background-image", "url('/Framework/images/1_02.gif')");
    $(".topmenu").children().eq(0).children().eq(1).css("background-repeat", "repeat-x");
    $(".topmenu").children().eq(0).css("color", "#ffffff");
    $(".topmenu").children().eq(0).children().eq(2).css("background-image", "url('/Framework/images/1_03.gif')");
    $(".topmenu").children().eq(0).children().eq(2).css("background-repeat", "no-repeat");
    $(".topmenu").children().each(function () {
        if ($(this).get(0).tagName == "dl" || $(this).get(0).tagName == "DL") {
            $(this).bind("mouseover", function () {
                if ($(this).attr("open") == "false") {
                    $(this).children().eq(0).css("background-image", "url('/Framework/images/1_01.gif')");
                    $(this).children().eq(0).css("background-repeat", "no-repeat");
                    $(this).children().eq(1).css("background-image", "url('/Framework/images/1_02.gif')");
                    $(this).children().eq(1).css("background-repeat", "repeat-x");
                    $(this).children().eq(2).css("background-image", "url('/Framework/images/1_03.gif')");
                    $(this).children().eq(2).css("background-repeat", "no-repeat");
                    $(this).css("color", "#ffffff");
                }
            });
            $(this).bind("mouseout", function () {
                if ($(this).attr("open") == "false") {
                    $(this).children().eq(0).css("background-image", "");
                    $(this).children().eq(1).css("background-image", "");
                    $(this).children().eq(2).css("background-image", "");
                    $(this).css("color", "#000000");
                }
            });
        }
    });
    $(".iframebtn").children().eq(0).bind("click", function () {
        if ($(this).attr("src") == "/Framework/images/lineopen.gif") {
            $(this).attr("src", "/Framework/images/lineclose.gif");
            $(".iframeleftmenu").show();
            $(".iframemainbody").css("margin-left", "172px");
        }
        else {
            $(".iframeleftmenu").hide();
            $(this).attr("src", "/Framework/images/lineopen.gif");
            $(".iframemainbody").css("margin-left", "7px")
        }
    });
    $(window).resize(function () {
        $(".iframeleftmenu").css("height", $(window).height() - 38 + "px");
        $(".iframebtn").css("height", $(window).height() - 38 + "px");
        $(".iframebtn").children().eq(0).css("padding-top", ($(window).height() - 38 - 73) / 2 + "px");
        $(".iframemainbody").css("height", $(window).height() - 38 + "px");
    });
});
function ShowHideMenu(op) {
    $(".topmenu").children().each(function () {
        $(this).children().eq(0).css("background-image", "");
        $(this).children().eq(1).css("background-image", "");
        $(this).children().eq(2).css("background-image", "");
        $(this).css("color", "#000000");
        $(this).attr("open", "false");
    });
    $("#" + op).children().eq(0).css("background-image", "url('/Framework/images/1_01.gif')");
    $("#" + op).children().eq(0).css("background-repeat", "no-repeat");
    $("#" + op).children().eq(1).css("background-image", "url('/Framework/images/1_02.gif')");
    $("#" + op).children().eq(1).css("background-repeat", "repeat-x");
    $("#" + op).children().eq(2).css("background-image", "url('/Framework/images/1_03.gif')");
    $("#" + op).children().eq(2).css("background-repeat", "no-repeat");
    $("#" + op).css("color", "#ffffff");
    $("#" + op).attr("open", "true");
}

function aaa() {
    $('.iframeleftmenu').children().eq(0).attr('src', '/Framework/left.aspx?xml=' + encodeURIComponent(''));
}